home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 3.iso
/
bin
/
startClient
< prev
next >
Wrap
Text File
|
1996-11-11
|
2KB
|
100 lines
#!/bin/csh -f
#
# update path to also look in the same directory from where this script
# was executed from
#
set path = (/usr/bsd /bin /usr/bin /usr/sbin /usr/bin/X11)
set DT_xconfirm = "$DT_utilities/DT_xconfirm"
set path = (${DT_util_path} $path)
#
# make sure our server is running
#
isServerRunning
if ($status == 0) then
$DT_xconfirm error "Server is not running... aborting."
exit 0
endif
#
# find out and remember the user name
#
if ($?HOME) then
set userHome = $HOME
else
$DT_xconfirm nohome
exit 0
endif
#
# invoke the client with the appropriate port number
#
if ( ! -e $userHome/$DT_WWW_ROOT/logs/httpd.port ) then
$DT_xconfirm error "Could not find port for Netscape."
exit 0
endif
set sockPort = `cat $userHome/$DT_WWW_ROOT/logs/httpd.port`
#
# prepare an environment to launch netscape
#
if {$?XUSERFILESEARCHPATH} then
setenv XUSERFILESEARCHPATH "$DT_utilities/%N:$XUSERFILESEARCHPATH"
else
setenv XUSERFILESEARCHPATH "$DT_utilities/%N"
endif
#
# ensure client .netscape-preferences, mailcap and mime.type files are adjusted
#
mimecapper
if ($status == 0) then
exit 0
endif
if ($DT_domain == "") then
set mydomain = ":"
else
set mydomain = ".${DT_domain}:"
endif
echo " "
echo "invoking netscape ...."
echo " "
set URL = "http://$DT_hostname$mydomain$sockPort/$DT_URL"
# someday figure out how to get mimetypes/caps read and for netscape to
# hold till completed (get viewDT and netscape windows up at the same time)
if ($DT_network) then
set hostresorder = "local bind nis"
else
set hostresorder = "local"
endif
#if (-l $HOME/.netscape/lock) then
# ( \
# cd /tmp ; \
# setenv HOSTRESORDER "$hostresorder"; \
# exec $DT_utilities/netscape -noraise -remote "openURL($URL,new-window)" \
# )
#
#else
( \
cd /tmp ; \
setenv HOSTRESORDER "$hostresorder"; \
exec $DT_utilities/netscape $DT_VIEW_OPT $URL \
)
#
#endif
exit 1